/**
 * 删列造序
 *
 * @USER: Administrator
 * @DATE: 2024/9/16 下午11:33
 * @VERSION: 1.0.0
 */
public class LC944 {
    public static void main(String[] args) {

    }

    public int minDeletionSize(String[] strs) {
        int length = strs[0].length();
        int result = 0;
        for (int i = 0; i < length; i++) {
            for (int j = 1; j < strs.length; j++) {
                if (strs[j].charAt(i) < strs[j - 1].charAt(i)) {
                    result++;
                    break;
                }
            }
        }

        return result;
    }

}
